package com.qijian.maindata.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qijian.maindata.domain.CustomerComplaintsItem;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * 客户投诉问题Mapper接口
 *
 * @author qijian
 * @date 2024-09-06
 */
public interface CustomerComplaintsItemMapper extends BaseMapper<CustomerComplaintsItem> {

    @Select("select count(0) from main_customer_complaints_item WHERE create_time >= CURRENT_DATE ")
    int countCurrentDateWithDel();

    @Update("delete from main_customer_complaints_item  where main_id = #{mainId}")
    void removeByMainId(@Param("mainId") Long mainId);
}
